<!DOCTYPE >
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>基本设置</title>
  <link rel="stylesheet" type="text/css" href="/system/css/right.css">
  <script type="text/javascript" src="/system/js/jquery.js"></script>
  <script type="text/javascript" src="/system/js/system.js"></script>
  <script type="text/javascript" src="/system/js/admin.js"></script>
</head>
<body style="overflow: auto;">
<!-- 添加属性弹窗 -->
<div class="addcontent">
	<div class="guanbi" title="关闭" onclick="showcon()">X</div>
		<span>输入内容</span>
		<ul>
			<li><span>标题：</span><span><input type="text" value="" name="name"></span></li>


			<li><span><input  class="submit" onclick="addcontent()" type="submit" value="添加" ></span></li>
		</ul>
</div>
<!-- /添加属性弹窗 -->

	<div class="basic bor">
			<div class="title fl">当前位置：属性管理 > 修改属性</div>
			<div class="basic_r fr"><a href="">基本信息</a></div>
	</div>
	<div class="notice">
			<div class="n_title">
				<span class="fl">修改属性</span>

			</div>
			<div class="ncontent">
				<form action="{:url('Attribute/upattribute')}" method="post" enctype="multipart/form-data" >
					<div class="setting">

						<ul >
							<dl class="contents">
								{volist name="list" id="li" key="k" }
									<div class="clear"></div><li del_id="{$k}">
										<input type="hidden"  name="names[]" value="{$li.name}" />
										 <dd class="setting_t fl"><span>*</span>{$li.name}：</dd> <dd class="setting_p fl"><input class="seinp" type="text" name="title[]" value="{$li.title}">
											 备注：<input class="seinp" type="text" name="remarks[]" value="{$li.remarks}">
											  <span class="del" ><img title="删除" src="/system/images/del.png" onclick="dels({$k})"  width="30" alt="">
										 </span> </dd> </li>
								{/volist}
								</dl>

							<li>

							</li>
								<div class="clear"></div>
							<li>
								<dd class="setting_t fl"><span>*</span>添加属性：</dd>
								<dd class="setting_p fl">
									<div class="addioc" onclick="showcon()" title="添加属性">
										<img src="/system/images/addioc.png" width="60" alt="添加选项">
									</div>
								</dd>
							</li>
						<div class="clear"></div>
							<li>
								<dd class="setting_t fl"><span></span></dd>
								<dd class="setting_p fl">
									<input type="hidden" name="id" value="{$Request.param.id}">
										<input class="submit" type="submit" value="保存">
								</dd>
							</li>
						</ul>

					</div>
					</form>
			</div>
	</div>
<script type="text/javascript">
	//显示状态
	function showcon() {
			$('.addcontent').toggle();
	}

	//添加状态
	ids = 100;
	function addcontent(){
			var name =	$('input[name=name]').val();
			var remarks =	$('input[name=remarks]').val();
		html = '<div class="clear"></div><li del_id="'+ids+'"><input type="hidden"  name="names[]" value="'+name+'" /> <dd class="setting_t fl"><span>*</span>'+name+'：</dd> <dd class="setting_p fl"><input class="seinp" type="text" name="title[]" value=""> 备注：<input class="seinp" type="text" name="remarks[]" value="'+remarks+'"><span class="del"><img title="删除" src="/public/system/images/del.png" onclick="dels('+ids+')"  width="30" alt=""></span> </dd> </li>';
		$('.contents').append(html);
			ids = ids+1;
	}
	//删除状态
	function dels(id){
			$('[del_id='+id+']').remove();
	}




</script>



</body>
</html>
